package com.lyrcsoft.springbootaop.service;

import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import javax.servlet.http.HttpSession;


/**
 * @author fujc2dev@126.com
 * @date 2024-12-19
 */
@Service
public class SessionService {

    @Resource
    private HttpSession session;


    public String getSession() {

        return String.valueOf(session.getAttribute("username"));
    }

    public void setSession(String userName) {
        session.setAttribute("username", userName);
    }
}
